package com.nuoniu.sibanyun.entity.crm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 客户商机
 * </p>
 *
 * @author baiqiang
 * @since 2020-07-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("crm_business")
@ApiModel(value="CrmBusiness对象", description="客户商机")
public class CrmBusiness extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "客户id")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "商机编号")
    @TableField("project_no")
    private String projectNo;

    @ApiModelProperty(value = "商机标题")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "市场活动id")
    @TableField("activity_id")
    private Integer activityId;

    @ApiModelProperty(value = "市场活动名称")
    @TableField("activity_name")
    private String activityName;

    @ApiModelProperty(value = "商机类型1:新加盟2:老客户续签")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "销售阶段1:初步接洽2:需求确定3:方案/报价4:赢单5:输单")
    @TableField("sale_stage")
    private String saleStage;

    @ApiModelProperty(value = "商机获取日期")
    @TableField("get_date")
    private LocalDate getDate;

    @ApiModelProperty(value = "项目负责人Id")
    @TableField("charge_man_id")
    private Integer chargeManId;

    @ApiModelProperty(value = "项目负责人姓名")
    @TableField("charge_man_name")
    private String chargeManName;

    @ApiModelProperty(value = "预计收入")
    @TableField("anticipated_revenue")
    private BigDecimal anticipatedRevenue;

    @ApiModelProperty(value = "成交可能性")
    @TableField("deal_probability")
    private String dealProbability;

    @ApiModelProperty(value = "预计签单日期")
    @TableField("expect_sign_date")
    private LocalDate expectSignDate;

    @ApiModelProperty(value = "竞争对手")
    @TableField("competitor")
    private String competitor;

    @ApiModelProperty(value = "进行状态：正在进行 赢单 输单 无效")
    @TableField("going_status")
    private String goingStatus;

    @ApiModelProperty(value = "状态0:正常 1:删除 2:停用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "输单原因")
    @TableField("lose_reason")
    private String loseReason;

    @ApiModelProperty(value = "商机备注、描述")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人姓名")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "创建日期")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改日期")
    @TableField("update_date")
    private LocalDateTime updateDate;


}
